import request from '@/utils/request'

//回显
export function ByIdPremisesInfo(id) {
  alert(id)
  return request({
    url: '/house/info/ByIdPremisesInfo/'+id,
    method: 'get'
  })
}

// 查询社区类型复选框
export function communityType(id) {
  return request({
    url: '/house/info/communityType',
    method: 'get',
    params: id
  })
}

//复选框
export function buildingType(id) {
  return request({
    url: '/house/info/communityType',
    method: 'get',
    params: id
  })
}

//复选框
export function premisesType(id) {
  return request({
    url: '/house/info/communityType',
    method: 'get',
    params: id
  })
}

// 查询楼盘下拉框
export function RemarkList() {
  return request({
    url: '/house/info/RemarkList',
    method: 'get'
  })
}
// 查询商圈列表
export function ShangQuanList(county) {
  return request({
    url: '/house/info/ShangQuanList',
    method: 'get',
    params: county
  })
}

// 查询地铁列表
export function subwayList(city) {
  return request({
    url: '/house/info/subwayList',
    method: 'get',
    params: city
  })
}

// 查询省列表
export function shengList(parentId) {
  return request({
    url: '/house/info/shengList',
    method: 'get',
    params: parentId
  })
}

// 查询楼盘信息列表
export function listInfo(query) {
  return request({
    url: '/house/info/list',
    method: 'get',
    params: query
  })
}

// 查询楼盘信息详细
export function getInfo(id) {
  return request({
    url: '/house/info/' + id,
    method: 'get'
  })
}

// 新增楼盘信息
export function addInfo(data) {
  return request({
    url: '/house/info',
    method: 'post',
    data: data
  })
}

// 修改楼盘信息
export function updateInfo(data) {
  return request({
    url: '/house/info',
    method: 'put',
    data: data
  })
}

// 删除楼盘信息
export function delInfo(id) {
  return request({
    url: '/house/info/' + id,
    method: 'delete'
  })
}
